home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / util / libs / ReqToolsLib.lha / ReqToolsLib / Source / reqtools / rtsetreqposition.c < prev    next >
Encoding:
C/C++ Source or Header  |  2001-07-02  |  2.7 KB  |  103 lines

  1.  
  2. /*
  3.     (C) 1999 - 2000 AROS - The Amiga Research OS
  4.     $Id: rtsetreqposition.c,v 1.4 2000/12/15 20:43:35 stegerg Exp $
  5.  
  6.     Desc:
  7.     Lang: English
  8. */
  9.  
  10. #include <exec/types.h>
  11. #include <proto/exec.h>
  12. #include <proto/reqtools.h>
  13. #include <proto/intuition.h>
  14. #include <exec/libraries.h>
  15. #include <exec/memory.h>
  16. #include <libraries/reqtools.h>
  17. #include <aros/libcall.h>
  18.  
  19. #include "reqtools_intern.h"
  20. #include "general.h"
  21.  
  22. /*****************************************************************************
  23.  
  24.     NAME */
  25.  
  26.     AROS_LH4(void, rtSetReqPosition,
  27.  
  28. /*  SYNOPSIS */
  29.  
  30.     AROS_LHA(ULONG, reqpos, D0),
  31.     AROS_LHA(struct NewWindow *, nw, A0),
  32.     AROS_LHA(struct Screen *, scr, A1),
  33.     AROS_LHA(struct Window *, win, A2),
  34.  
  35. /*  LOCATION */
  36.  
  37.     struct ReqToolsBase *, ReqToolsBase, 21, ReqTools)
  38.  
  39. /*  FUNCTION
  40.     Sets newwindow->LeftEdge and newwindow->TopEdge according to reqpos.
  41.  
  42.     Except for the left- and topedge 'newwindow' must already be
  43.     completely initialized.
  44.  
  45.     The newwindow->LeftEdge and newwindow->TopEdge already in the
  46.     NewWindow structure will be used as offsets to the requested
  47.     position. If you'd like a window at position (25,18) from the top
  48.     left of the screen you would fill newwindow->LeftEdge with 25,
  49.     newwindow->TopEdge with 18 and call rtSetReqPosition() with reqpos
  50.     equal to REQPOS_TOPLEFTSCR.
  51.  
  52.     Don't forget to make sure newwindow->LeftEdge and newwindow->TopEdge
  53.     are 0 if you don't want to offset your window.
  54.  
  55.     In case of REQPOS_POINTER you can use them to point to your window's
  56.     hotspot, where the pointer should point. If you call
  57.     rtSetReqPosition() with the left- and topedge equal to 0 you'd get
  58.     a window appearing with its top- and leftedge equal to the current
  59.     pointer position.
  60.  
  61.     Note that the screen pointer may _NOT_ be NULL. If you have your
  62.     own window open you can supply yourwindow->WScreen to this function.
  63.  
  64.     The window pointer is only required if reqpos is REQPOS_CENTERWIN or
  65.     REQPOS_TOPLEFTWIN. Even in this case you may call rtSetReqPosition()
  66.     with a NULL window pointer. The positions will simply fall back to
  67.     REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR respectively.
  68.    
  69.     INPUTS
  70.     reqpos - one of the REQPOS_... constants usable with RT_ReqPos.
  71.     newwindow - pointer to your (already initialized) NewWindow
  72.         structure.
  73.     screen - pointer to screen the requester will appear on.
  74.     window - pointer to parent window or NULL.
  75.  
  76.     RESULT
  77.     none
  78.  
  79.     NOTES
  80.     This function is for the advanced ReqTools user.
  81.  
  82.     EXAMPLE
  83.  
  84.     BUGS
  85.     none known
  86.  
  87.     SEE ALSO
  88.     RT_ReqPos tag
  89.  
  90.     INTERNALS
  91.  
  92.     HISTORY
  93.  
  94. ******************************************************************************/
  95. {
  96.     AROS_LIBFUNC_INIT
  97.  
  98.     RTFuncs_rtSetReqPosition(reqpos, nw, scr, win);
  99.     
  100.     AROS_LIBFUNC_EXIT
  101.     
  102. } /* rtSetReqPosition */
  103.